package com.zhoukun.nacos.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author zhoukun 86547462@qq.com
 * @version 1.0
 * @date 2020/10/30 19:45
 */
@RestController
@Slf4j
public class NaController {

    @Value("${service-url.nacos-service}")
    private String url;

    @Autowired
    RestTemplate template;

    @GetMapping("/getid")
    public String uuid()
    {
        return template.getForObject(url+"/uuid",String.class);
    }
}
